package lianxi;

import java.util.Random;

public class SuiTang {
    public static void main(String[] args) {
       //1.输出字符串HelloWorld的字符串长度
        String a = "HelloWorld";
        System.out.println(a.length());
        System.out.println(a.indexOf("o"));
        System.out.println(a.indexOf("o",5));
        System.out.println(a.substring(0,5));
        System.out.println(a.substring(5,10));
        String b = " Hello ";
        System.out.println(b.trim());
        System.out.println(a.charAt(5));
        System.out.println(a.startsWith("H"));
        System.out.println(a.endsWith("ld"));
        System.out.println(a.toUpperCase());
        System.out.println(a.toLowerCase());
    }
}
